package com.example.spring_aop.controller;

import com.example.spring_aop.aspect.TimeRecord;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Li_yizYa
 * Date: 2025/7/24
 * Time: 15:27
 */
@Slf4j
@RequestMapping("/user")
@RestController
public class UserController {

    @TimeRecord
    @RequestMapping("/u1")
    public String u1() {
        log.info("执行 U1 方法");
        return "u1";
    }

    @RequestMapping("/u2")
    public String u2() {
        log.info("执行 U2 方法");
        return "u2";
    }
}
